using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class NetworkControl : GeneratedMessageLite<NetworkControl, NetworkControl.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<NetworkControl, NetworkControl.Builder>
		{
			private bool resultIsReadOnly;
			private NetworkControl result;
			protected override NetworkControl.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override NetworkControl MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override NetworkControl DefaultInstanceForType
			{
				get
				{
					return NetworkControl.DefaultInstance;
				}
			}
			public string PortList
			{
				get
				{
					return this.result.PortList;
				}
				set
				{
					this.SetPortList(value);
				}
			}
			public string TimeoutList
			{
				get
				{
					return this.result.TimeoutList;
				}
				set
				{
					this.SetTimeoutList(value);
				}
			}
			public Builder()
			{
				this.result = NetworkControl.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(NetworkControl cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private NetworkControl PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					NetworkControl other = this.result;
					this.result = new NetworkControl();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override NetworkControl.Builder Clear()
			{
				this.result = NetworkControl.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override NetworkControl.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new NetworkControl.Builder(this.result);
				}
				return new NetworkControl.Builder().MergeFrom(this.result);
			}
			public override NetworkControl BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override NetworkControl.Builder MergeFrom(IMessageLite other)
			{
				if (other is NetworkControl)
				{
					return this.MergeFrom((NetworkControl)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override NetworkControl.Builder MergeFrom(NetworkControl other)
			{
				return this;
			}
			public override NetworkControl.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override NetworkControl.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(NetworkControl._networkControlFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = NetworkControl._networkControlFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasTimeoutList = input.ReadString(ref this.result.timeoutList_);
						}
					}
					else
					{
						this.result.hasPortList = input.ReadString(ref this.result.portList_);
					}
				}
				return this;
			}
			public NetworkControl.Builder SetPortList(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPortList = true;
				this.result.portList_ = value;
				return this;
			}
			public NetworkControl.Builder ClearPortList()
			{
				this.PrepareBuilder();
				this.result.hasPortList = false;
				this.result.portList_ = "";
				return this;
			}
			public NetworkControl.Builder SetTimeoutList(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasTimeoutList = true;
				this.result.timeoutList_ = value;
				return this;
			}
			public NetworkControl.Builder ClearTimeoutList()
			{
				this.PrepareBuilder();
				this.result.hasTimeoutList = false;
				this.result.timeoutList_ = "";
				return this;
			}
		}
		public const int PortListFieldNumber = 1;
		public const int TimeoutListFieldNumber = 2;
		private static readonly NetworkControl defaultInstance;
		private static readonly string[] _networkControlFieldNames;
		private static readonly uint[] _networkControlFieldTags;
		private bool hasPortList;
		private string portList_ = "";
		private bool hasTimeoutList;
		private string timeoutList_ = "";
		private int memoizedSerializedSize = -1;
		public static NetworkControl DefaultInstance
		{
			get
			{
				return NetworkControl.defaultInstance;
			}
		}
		public override NetworkControl DefaultInstanceForType
		{
			get
			{
				return NetworkControl.DefaultInstance;
			}
		}
		protected override NetworkControl ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string PortList
		{
			get
			{
				return this.portList_;
			}
		}
		public string TimeoutList
		{
			get
			{
				return this.timeoutList_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasPortList)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.PortList);
				}
				if (this.hasTimeoutList)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.TimeoutList);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private NetworkControl()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] networkControlFieldNames = NetworkControl._networkControlFieldNames;
			if (this.hasPortList)
			{
				output.WriteString(1, networkControlFieldNames[0], this.PortList);
			}
			if (this.hasTimeoutList)
			{
				output.WriteString(2, networkControlFieldNames[1], this.TimeoutList);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasPortList)
			{
				num ^= this.portList_.GetHashCode();
			}
			if (this.hasTimeoutList)
			{
				num ^= this.timeoutList_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			NetworkControl networkControl = value as NetworkControl;
			return networkControl != null && (this.hasPortList == networkControl.hasPortList && (!this.hasPortList || this.portList_.Equals(networkControl.portList_))) && (this.hasTimeoutList == networkControl.hasTimeoutList && (!this.hasTimeoutList || this.timeoutList_.Equals(networkControl.timeoutList_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<NetworkControl, NetworkControl.Builder>.PrintField("PortList", this.hasPortList, this.portList_, writer);
			GeneratedMessageLite<NetworkControl, NetworkControl.Builder>.PrintField("TimeoutList", this.hasTimeoutList, this.timeoutList_, writer);
		}
		public static NetworkControl ParseFrom(byte[] data)
		{
			return NetworkControl.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private NetworkControl MakeReadOnly()
		{
			return this;
		}
		public static NetworkControl.Builder CreateBuilder()
		{
			return new NetworkControl.Builder();
		}
		public override NetworkControl.Builder ToBuilder()
		{
			return NetworkControl.CreateBuilder(this);
		}
		public override NetworkControl.Builder CreateBuilderForType()
		{
			return new NetworkControl.Builder();
		}
		public static NetworkControl.Builder CreateBuilder(NetworkControl prototype)
		{
			return new NetworkControl.Builder(prototype);
		}
		static NetworkControl()
		{
			NetworkControl.defaultInstance = new NetworkControl().MakeReadOnly();
			NetworkControl._networkControlFieldNames = new string[]
			{
				"PortList",
				"TimeoutList"
			};
			NetworkControl._networkControlFieldTags = new uint[]
			{
				10u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.NetworkControl.Descriptor, null);
		}
	}
}
